Don't double-free email and author if reading multiple files.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 5 Dec 2003 22:40:11 +0000 (22:40 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 5 Dec 2003 22:40:11 +0000 (22:40 +0000)
gpsbabel/gpx.c

index f40512b66b8367c5ca23738b5b19590179aa94b0..09f29e3c8196487156fc700ad9aad600edf14644 100644 (file)
@@ -742,12 +742,15 @@ gpx_rd_deinit(void)
 {
        if ( cdatastr ) {
                xfree(cdatastr);
+               cdatastr = NULL;
        }
        if ( gpx_email ) {
                xfree(gpx_email);
+               gpx_email = NULL;
        }
        if ( gpx_author ) {
                xfree(gpx_author);
+               gpx_author = NULL;
        }
        if (fd) {
                fclose(fd);